package com.effectiv.crm.config;


import javax.servlet.Filter;

import lombok.extern.slf4j.Slf4j;

import org.springframework.web.filter.DelegatingFilterProxy;
import org.springframework.web.servlet.support.AbstractAnnotationConfigDispatcherServletInitializer;

@Slf4j
public class ApplicationBootstrapConfigurer extends
		AbstractAnnotationConfigDispatcherServletInitializer {

	@Override
	protected Class<?>[] getRootConfigClasses() {
		
		return new Class[] { ServiceConfiguration.class,
				SecurityConfiguration.class, MongoConfiguration.class };
		
	}

	@Override
	protected Class<?>[] getServletConfigClasses() {
		return new Class[] { WebMvcConfiguration.class };
	}

	@Override
	protected String[] getServletMappings() {
		return new String[] { "/" };
	}

	@Override
	protected Filter[] getServletFilters() {
		return new Filter[] { new DelegatingFilterProxy(
				"springSecurityFilterChain") };
	}

	

}
